package com.zqh.apiuseraddrcud.controller;

import com.zqh.myfmmall.clients.UserAddrCUDClient;
import com.zqh.myfmmall.result.Result;
import com.zqh.myfmmall.rowbeans.entity.UserAddr;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description :
 * @Author :kono淇杭哒、
 * @Create 2022-03-05 23:00
 */
@RestController
@RequestMapping("userAddr/cud")

public class ApiUserAddrCUDController{
    /**
     * 服务对象
     */
    @Autowired
    private UserAddrCUDClient userAddrCUDClient;

    @PostMapping("create")
    public Result create(@RequestBody UserAddr userAddr){
        return userAddrCUDClient.create(userAddr);
    }

    @PutMapping("update")
    Result update (@RequestBody UserAddr userAddr){
        return userAddrCUDClient.update(userAddr);
    }

    @DeleteMapping("delete/{id}")
    Result delete(@PathVariable String id){
        return userAddrCUDClient.delete(id);
    }

}
